﻿using Basic.FormModel.DB;
using WeDonekRpc.Helper;
using WeDonekRpc.SqlSugar;

namespace Basic.FormDAL.Repository
{
    internal class UserFormItemDAL : BasicDAL<DBUserFormItem, long>, IUserFormItemDAL
    {
        public UserFormItemDAL ( IRepository<DBUserFormItem> basicDAL ) : base(basicDAL, "user.record.item")
        {
        }
        public void Clear ( long recordId )
        {
            if ( !this._BasicDAL.Delete(a => a.RecordId == recordId) )
            {
                throw new ErrorException("form.user.record.item.delete.fail");
            }
        }
    }
}
